<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdvisesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('advises', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedMediumInteger('user_id')->default(0)->comment('用户ID');
            $table->string('device_no', 16)->default('')->comment('设备编号');
			$table->boolean('state')->default(0)->comment('0:待处理 1:处理中 2:已处理');
			$table->string('problem', 1000)->default('')->comment('问题内容');
			$table->unsignedMediumInteger('actor_id')->default(0)->comment('处理人ID');
			$table->unsignedMediumInteger('actor_at')->default(0)->comment('处理人时间');
			$table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('advises');
    }
}
